﻿#include <QCoreApplication>

#include "concreteobserver.h"
#include "concretesubject.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    ConcreteObserver* observer = new ConcreteObserver();

    ConcreteSubject* subject = new ConcreteSubject();

    subject->attach(observer);

    subject->setState(2);
    subject->notify();

    delete observer;
    delete subject;

    return a.exec();
}
